<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>01-JQuery引入</title>
    <script src="../js/jquery-3.6.0.js"></script>
    <script>

        $(function () {
            $("button").click(function () {
                $("#p1").hide()
                $(".c1,.c2").hide()
            })
        });

    </script>
</head>
<body>
<p id="p1">段落1</p>
<p id="p2">段落2</p>
<p class="c1">段落3</p>
<p class="c2">段落4</p>
<p class="c3">段落5</p>
<button>点我隐藏段落</button>
</body>
</html>